<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <!-- 引入vue2的js文件 -->
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.9/vue.js"></script>
  </head>
  <body>
    <!-- MVVM中的View视图 -->
    <div id="app">
      <!-- 下面这种写法，src的值就写死了 -->
      <!-- <img
        src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F4423599a-df06-44c6-9493-f2f831c3b990%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1697610285&t=a247d38189f45acf67ba301c512f8e22"
        alt=""
      /> -->
      <!-- 下面这种写法，src的值就没有写死 -->
      <!-- <img style="width: 600px" v-bind:src="imgUrl" alt="" /> -->
      <!-- v-bind:可以简写成: -->
      <img style="width: 600px" :src="imgUrl" alt="" />
    </div>

    <script>
      // MVVM中的ViewModel
      new Vue({
        el: '#app',
        data: {
          imgUrl:
            'https://img1.baidu.com/it/u=2929710579,3996007340&fm=253&fmt=auto&app=120&f=JPEG?w=1422&h=800'
        }
      })
    </script>
  </body>
</html>
